home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
watchdog.zip
/
WATCHDOG.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1996-05-24
|
20KB
|
491 lines
/*.............. WatchDog session .................*/
/* (c) AMM,SFY,Sleepy House 1995,96 v.3.33 */
Call rxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
Call SysLoadFuncs
ESC = '1B'x || "["
black = 0
red = 1
green = 2
yellow = 3
blue = 4
magenta = 5
cyan = 6
white = 7
foreground = 30
background = 40
normal = 0
bold = 1
screen_normal = normal||";"||foreground+cyan||";"||background+black
screen_inverse = normal||";"||foreground+black||";"||background+cyan
text_normal = screen_normal
text_ord = screen_normal||";"||foreground+white
text_info = screen_normal||";"||foreground+7
text_iv = screen_normal||";"||foreground+5
text_wait = screen_normal||";"||foreground+green
text_extrn = screen_normal||";"||bold||";"||foreground+blue
text_highlight = screen_normal||";"||bold||";"||foreground+yellow
text_alarm = screen_normal||";"||bold||";"||foreground+red
screen_normal = ESC||screen_normal||"m"
screen_inverse = ESC||screen_inverse||"m"
text_normal = ESC||text_normal||"m"
text_ord = ESC||text_ord||"m"
text_info = ESC||text_info||"m"
text_iv = ESC||text_iv||"m"
text_wait = ESC||text_wait||"m"
text_extrn = ESC||text_extrn||"m"
text_highlight = ESC||text_highlight||"m"
text_alarm = ESC||text_alarm||"m"
cSleep = 60
cLoop = 30
MaxLines = 1 /* ºñÑß∞ ¬«½¿τÑßΓó« ½¿¡¿⌐ (¼áßΓÑp ¡Ñ óßτÑΓ) */
state.0 = '?'
state.1 = '?'
state.2 = '.'
'@echo off'
'Mode CO60,40'
Call Charout ,screen_normal
Say Center(' WatchDog Session Sleepy House 'Date()' ', 60, '═')
Say ' '
/* ñá½ÑÑ »«½πτáѼ ¡áτá½∞¡δ⌐ pẼÑp ½«úá π ¼áßΓÑpá, ß½Ñ⌐ó«ó ¿ Γ«ßßÑpá */
do i=0 to MaxLines
Call SysFileTree 'C:\fido\Log\t-mail'||i||'.Log','sss','F'
if sss.0 = 0 then Age.i = '00'||i
else Parse Value sss.1 With aaa Age.i bbb ccc ddd
oldAge.i = 'Now'
end
oldAge.3 = '?'
Call SysFileTree 'C:\fido\Log\Squish.Log','sss','F'
if sss.0 = 0 then Age_Sq = '0Sq'
else Parse Value sss.1 With aaa Age_Sq bbb ccc ddd
oldAge_Sq = 'Now'
Call SysFileDelete 'C:\fido\t-mail\Flags\OutStat.OK'
/* µ¿¬½ »« ª¿º¡¿ */
Do forever
sHH = Time('H')
Select
/*
When sHH=8 then do
if FileExist('C:\fido\t-mail\Flags\OutStat.OK')="N"
then do
Say ' -!!!- Prepare Outbound Statistics ...'
say ' '
'@cd \fido\Tmp'
'@C:\fido\Tools\MisureP C:\fido\Out\ -z -w -d>OutStat.Msg 2>nul'
Call LineOut "C:\fido\Tmp\OutStat.Msg",'(*1000) Free Total '
Parse Value SysDriveInfo('C:') With sDrive sFree sTotal sLabel
Call LineOut "C:\fido\Tmp\OutStat.Msg",'Disk 'sdrive ' ' trunc(Format(sFree/1000000),3) ' ' trunc(Format(sTotal/1000000),3)
Parse Value SysDriveInfo('d:') With sDrive sFree sTotal sLabel
Call LineOut "C:\fido\Tmp\OutStat.Msg",'Disk 'sdrive ' ' trunc(Format(sFree/1000000),3) ' ' trunc(Format(sTotal/1000000),3)
Call LineOut "C:\fido\Tmp\OutStat.Msg",' '
Call Charout "C:\fido\Tmp\OutStat.Msg"
'@c:\fido\tools\SendMsg $c:\fido\mail\sleepyr OutBound/2,2:5020/333.333 All,2:5020/333 "-sLook:" -m< C:\fido\Tmp\OutStat.Msg >nul'
Call SysFileDelete 'OutStat.Msg'
Call Charout "C:\fido\t-mail\Flags\OutStat.OK",,1
Call Charout "C:\fido\t-mail\Flags\OutStat.OK"
end
else nop
end
*/
When sHH=8 then do
if FileExist('C:\fido\t-mail\Flags\BackUp.OK')="N"
then do
Say ' -!!!- Backup /333 files ...'
say ' '
'@start "Backup" /b/c C:\fido\bat\sh333.Cmd'
Call Charout "C:\fido\t-mail\Flags\Backup.OK",,1
Call Charout "C:\fido\t-mail\Flags\Backup.OK"
Call SysSleep 15
end
else nop
end
Otherwise
Call SysFileDelete 'C:\fido\t-mail\Flags\Backup.OK'
/* Call SysFileDelete 'C:\fido\t-mail\Flags\OutStat.OK' */
end
Say text_iv' Log: Master='oldAge.0', Line#1='oldAge.1', Line#2='oldAge.3', Tosser='oldAge_Sq
Say ' '
Say text_normal'─##┬Time────┬M┬1┬2┬T┬C┬FreeC(K)┬FreeD(K)┬In(K)──┬Out(K)───'
Say ' │ │ │ │ │ │ │ │ │ │'
Do jj=1 To cLoop
/*»« commonstste=X πñá½∩εΓ∩ óßÑ bsy */
Select
when CommonState=='·' then CommonState='∙'
when CommonState=='∙' then CommonState='÷'
when CommonState=='÷' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState='■'
when CommonState=='■' then CommonState='≡'
when CommonState=='≡' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState=''
when CommonState=='' then CommonState='X'
Otherwise CommonState='·'
end
/*ºñÑßΓ∞ τ¿ßΓ« ñ½∩ φßΓÑΓ¿¬¿ ¿ ¿¡Σ«p¼áΓ¿ó¡«ß¿ óδ∩ß¡∩ε ÑßΓ∞ ½¿ ¼áßΓÑp*/
if FileExist('C:\fido\t-mail\t-crash$.$00')='Y'
then state.0=text_ord'·'
else state.0=text_alarm'?'
/*ß½Ñ⌐óδ*/
Do kk=1 to MaxLines
if FileExist('C:\fido\t-mail\t-crash$.$0'||kk)='Y'
then do
if FileExist('C:\fido\t-mail\flags\busy.00'||kk)='Y'
then do
Call SysSleep 5
/* »«ß¬«½∞¬π π ¼Ñ¡∩ ß½Ñ⌐ó «ñ¿¡ Γ« ¼¡Ñ í佫 ½Ñ¡∞ »ÑpÑñѽδóáΓ∞
su 2 dcd ñó«⌐¬á «º¡áτáÑΓ óΓ«p«⌐ »«pΓ */
'C:\os2\SIO\su.exe 2 DCD >nul'
if rc == 0 then do
call SysSleep 5
if FileExist('C:\fido\t-mail\Flags\busy.00'||kk)='Y'
then do
Call KillLine(kk)
Call EraseBsy('S')
state.kk = text_alarm'K'
end
else state.kk = text_ord'·'
end
else do
state.kk = text_highlight'C'
CommonState=' '
end
end
/* π ¼Ñ¡∩ ÑΘÑ bbs */
else
if FileExist('C:\ra\rabusy'.||kk)='Y'
then
do
state.kk = text_extrn'B'
Call SysSleep 5
'C:\os2\SIO\su.exe 2 DCD >nul'
if rc == 0 then do
call SysSleep 5
if FileExist('C:\ra\rabusy'.||kk)='Y'
then do
'@go -k BBS.BAT >nul'
state.kk = text_alarm'B'
end
end
end
else
if FileExist('C:\fido\t-mail\Flags\voice.00'||kk)='Y'